/*
 * @Author: 弗兰克 1085068573@qq.com
 * @Date: 2023-01-09 22:06:19
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2023-01-09 23:28:45
 * @FilePath: \vue3-ts-cms\src\views\login\config\account-config.ts
 * @Description: 编写登录校验规则
 *
 * Copyright (c) 2023 by 弗兰克 1085068573@qq.com, All Rights Reserved.
 */
export const rules = {
  name: [
    {
      required: true,
      message: '请输入用户名',
      trigger: 'blur'
    },
    {
      pattern: /^[a-z0-9]{5,10}$/,
      message: '用户名必须是5~10个字母或者数字~',
      trigger: 'blur'
    }
  ],
  password: [
    {
      required: true,
      message: '密码是必传内容~',
      trigger: 'blur'
    },
    {
      pattern: /^[a-z0-9]{3,}$/,
      message: '用户名必须是3位以上的字母或者数字~',
      trigger: 'blur'
    }
  ]
}
